package ShuZu;

public class Demo01 {
    public static void main(String[] args) {

//        找出最大值，最小值
        int[] arrs = {44, 54, -43, -23, 11, -34, 33};
        int length = arrs.length;
        int min = arrs[0];
        int max = arrs[0];

        for (int i = 1; i < length; i++) {
            if (min > arrs[i]) {
                min = arrs[i];
            }
            if (max < arrs[i]) {
                max = arrs[i];
            }
        }
        System.out.println("min=" + min + "\n" + "max=" + max);
    }
}
